home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / HENSA / MISC / SHELL.ARC / Shell / Sources / c / Poll < prev    next >
Text File  |  1994-11-10  |  571b  |  29 lines

  1. #include <time.h>
  2.  
  3. #include "DeskLib:Event.h"
  4.  
  5. #include "Shell.Shell.h"
  6.  
  7.  
  8. /* these are used in the macro Shell_PollSlow(), defined in 'Shell.Shell.h' */
  9. clock_t    Shell_nextpolltime = 0;
  10. clock_t    Shell_pollinterval = 0;
  11.  
  12. BOOL    Shell_paused = FALSE;
  13.  
  14.  
  15. void    Shell_Poll( void)
  16. {
  17. /* This polls the wimp until a null event is received */
  18. event_pollmask    oldmask = event_mask;
  19.  
  20. do    {
  21.     event_mask.data.null = 0;    /* make sure null events are returned */
  22.     Event_Poll();
  23.     }
  24.     while ( event_lastevent.type != event_NULL || Shell_paused);
  25.     
  26. event_mask = oldmask;    /* Restore old mask.    */
  27.  
  28. }
  29.